crypto/tls.Conn.config (field)
165 uses
crypto/tls (current package)
conn.go#L44: config *Config // configuration passed to constructor
conn.go#L903: if c.config.DynamicRecordSizingDisabled || typ != recordTypeApplicationData {
conn.go#L1032: outBuf, err = c.out.encrypt(outBuf, data[:m], c.config.rand())
conn.go#L1280: switch c.config.Renegotiation {
conn.go#L1650: if c.config.Renegotiation != RenegotiateNever {
handshake_client.go#L45: config := c.config
handshake_client.go#L197: if c.config.EncryptedClientHelloConfigList != nil {
handshake_client.go#L198: if c.config.MinVersion != 0 && c.config.MinVersion < VersionTLS13 {
handshake_client.go#L201: if c.config.MaxVersion != 0 && c.config.MaxVersion <= VersionTLS12 {
handshake_client.go#L204: echConfigs, err := parseECHConfigList(c.config.EncryptedClientHelloConfigList)
handshake_client.go#L254: if c.config == nil {
handshake_client.go#L255: c.config = defaultConfig()
handshake_client.go#L282: c.config.ClientSessionCache.Put(cacheKey, nil)
handshake_client.go#L297: _, err = io.ReadFull(c.config.rand(), hello.random)
handshake_client.go#L346: maxVers := c.config.maxSupportedVersion(roleClient)
handshake_client.go#L382: if c.config.SessionTicketsDisabled || c.config.ClientSessionCache == nil {
handshake_client.go#L410: cs, ok := c.config.ClientSessionCache.Get(cacheKey)
handshake_client.go#L431: if c.config.time().After(session.peerCertificates[0].NotAfter) {
handshake_client.go#L433: c.config.ClientSessionCache.Put(cacheKey, nil)
handshake_client.go#L436: if !c.config.InsecureSkipVerify {
handshake_client.go#L441: if err := session.peerCertificates[0].VerifyHostname(c.config.ServerName); err != nil {
handshake_client.go#L463: if c.config.time().After(time.Unix(int64(session.useBy), 0)) {
handshake_client.go#L464: c.config.ClientSessionCache.Put(cacheKey, nil)
handshake_client.go#L504: ticketAge := c.config.time().Sub(time.Unix(int64(session.createdAt), 0))
handshake_client.go#L529: vers, ok := c.config.mutualVersion(roleClient, []uint16{peerVersion})
handshake_client.go#L572: if isResume || (len(c.config.Certificates) == 0 && c.config.GetClientCertificate == nil) {
handshake_client.go#L599: if c.config.VerifyConnection != nil {
handshake_client.go#L600: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_client.go#L648: if hs.c.config.CipherSuites == nil && !fips140tls.Required() && rsaKexCiphers[hs.suite.id] {
handshake_client.go#L652: if hs.c.config.CipherSuites == nil && !fips140tls.Required() && tdesCiphers[hs.suite.id] {
handshake_client.go#L724: err = keyAgreement.processServerKeyExchange(c.config, hs.hello, hs.serverHello, c.peerCertificates[0], skx)
handshake_client.go#L775: preMasterSecret, ckx, err := keyAgreement.generateClientKeyExchange(c.config, hs.hello, c.peerCertificates[0])
handshake_client.go#L798: if err := c.config.writeKeyLog(keyLogLabelTLS12, hs.hello.random, hs.masterSecret); err != nil {
handshake_client.go#L843: certVerify.signature, err = key.Sign(c.config.rand(), signed, signOpts)
handshake_client.go#L1072: c.config.ClientSessionCache.Put(cacheKey, cs)
handshake_client.go#L1130: echRejected := c.config.EncryptedClientHelloConfigList != nil && !c.echAccepted
handshake_client.go#L1132: if c.config.EncryptedClientHelloRejectionVerify != nil {
handshake_client.go#L1133: if err := c.config.EncryptedClientHelloRejectionVerify(c.connectionStateLocked()); err != nil {
handshake_client.go#L1139: Roots: c.config.RootCAs,
handshake_client.go#L1140: CurrentTime: c.config.time(),
handshake_client.go#L1160: } else if !c.config.InsecureSkipVerify {
handshake_client.go#L1162: Roots: c.config.RootCAs,
handshake_client.go#L1163: CurrentTime: c.config.time(),
handshake_client.go#L1164: DNSName: c.config.ServerName,
handshake_client.go#L1194: if c.config.VerifyPeerCertificate != nil && !echRejected {
handshake_client.go#L1195: if err := c.config.VerifyPeerCertificate(certificates, c.verifiedChains); err != nil {
handshake_client.go#L1201: if c.config.VerifyConnection != nil && !echRejected {
handshake_client.go#L1202: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_client.go#L1278: if c.config.GetClientCertificate != nil {
handshake_client.go#L1279: return c.config.GetClientCertificate(cri)
handshake_client.go#L1282: for _, chain := range c.config.Certificates {
handshake_client.go#L1296: if len(c.config.ServerName) > 0 {
handshake_client.go#L1297: return c.config.ServerName
handshake_client_tls13.go#L102: c.serverName = c.config.ServerName
handshake_client_tls13.go#L277: c.serverName = c.config.ServerName
handshake_client_tls13.go#L332: key, err := generateECDHEKey(c.config.rand(), curveID)
handshake_client_tls13.go#L348: ticketAge := c.config.time().Sub(time.Unix(int64(hs.session.createdAt), 0))
handshake_client_tls13.go#L530: err = c.config.writeKeyLog(keyLogLabelClientHandshake, hs.hello.random, clientSecret)
handshake_client_tls13.go#L535: err = c.config.writeKeyLog(keyLogLabelServerHandshake, hs.hello.random, serverSecret)
handshake_client_tls13.go#L622: if c.config.VerifyConnection != nil {
handshake_client_tls13.go#L623: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_client_tls13.go#L740: err = c.config.writeKeyLog(keyLogLabelClientTraffic, hs.hello.random, hs.trafficSecret)
handshake_client_tls13.go#L745: err = c.config.writeKeyLog(keyLogLabelServerTraffic, hs.hello.random, serverSecret)
handshake_client_tls13.go#L816: sig, err := cert.PrivateKey.(crypto.Signer).Sign(c.config.rand(), signed, signOpts)
handshake_client_tls13.go#L843: if !c.config.SessionTicketsDisabled && c.config.ClientSessionCache != nil {
handshake_client_tls13.go#L863: if c.config.SessionTicketsDisabled || c.config.ClientSessionCache == nil {
handshake_client_tls13.go#L898: session.useBy = uint64(c.config.time().Add(lifetime).Unix())
handshake_client_tls13.go#L908: c.config.ClientSessionCache.Put(cacheKey, cs)
handshake_server.go#L151: echKeys := c.config.EncryptedClientHelloKeys
handshake_server.go#L152: if c.config.GetEncryptedClientHelloKeys != nil {
handshake_server.go#L153: echKeys, err = c.config.GetEncryptedClientHelloKeys(clientHelloInfo(ctx, c, clientHello))
handshake_server.go#L166: originalConfig := c.config
handshake_server.go#L167: if c.config.GetConfigForClient != nil {
handshake_server.go#L169: if configForClient, err = c.config.GetConfigForClient(chi); err != nil {
handshake_server.go#L173: c.config = configForClient
handshake_server.go#L190: c.vers, ok = c.config.mutualVersion(roleServer, clientVersions)
handshake_server.go#L211: if c.config.MinVersion == 0 && c.vers < VersionTLS12 {
handshake_server.go#L242: maxVers := c.config.maxSupportedVersion(roleServer)
handshake_server.go#L251: _, err := io.ReadFull(c.config.rand(), serverRandom)
handshake_server.go#L269: selectedProto, err := negotiateALPN(c.config.NextProtos, hs.clientHello.alpnProtocols, false)
handshake_server.go#L277: hs.cert, err = c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello))
handshake_server.go#L290: hs.ecdheOk, err = supportsECDHE(c.config, c.vers, hs.clientHello.supportedCurves, hs.clientHello.supportedPoints)
handshake_server.go#L399: preferenceList := c.config.cipherSuites(isAESGCMPreferred(hs.clientHello.cipherSuites))
handshake_server.go#L409: if c.config.CipherSuites == nil && !fips140tls.Required() && rsaKexCiphers[hs.suite.id] {
handshake_server.go#L413: if c.config.CipherSuites == nil && !fips140tls.Required() && tdesCiphers[hs.suite.id] {
handshake_server.go#L421: if hs.clientHello.vers < c.config.maxSupportedVersion(roleServer) {
handshake_server.go#L457: if c.config.SessionTicketsDisabled {
handshake_server.go#L462: if c.config.UnwrapSession != nil {
handshake_server.go#L463: ss, err := c.config.UnwrapSession(hs.clientHello.sessionTicket, c.connectionStateLocked())
handshake_server.go#L472: plaintext := c.config.decryptTicket(hs.clientHello.sessionTicket, c.ticketKeys)
handshake_server.go#L487: if c.config.time().Sub(createdAt) > maxSessionTicketLifetime {
handshake_server.go#L510: c.config.supportedCipherSuites(), hs.cipherSuiteOk)
handshake_server.go#L516: needClientCerts := requiresClientCert(c.config.ClientAuth)
handshake_server.go#L520: if sessionHasClientCerts && c.config.ClientAuth == NoClientCert {
handshake_server.go#L523: if sessionHasClientCerts && c.config.time().After(sessionState.peerCertificates[0].NotAfter) {
handshake_server.go#L526: if sessionHasClientCerts && c.config.ClientAuth >= VerifyClientCertIfGiven &&
handshake_server.go#L578: if c.config.VerifyConnection != nil {
handshake_server.go#L579: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_server.go#L601: hs.hello.ticketSupported = hs.clientHello.ticketSupported && !c.config.SessionTicketsDisabled
handshake_server.go#L605: if c.config.ClientAuth == NoClientCert {
handshake_server.go#L632: skx, err := keyAgreement.generateServerKeyExchange(c.config, hs.cert, hs.clientHello, hs.hello)
handshake_server.go#L648: if c.config.ClientAuth >= RequestClientCert {
handshake_server.go#L665: if c.config.ClientCAs != nil {
handshake_server.go#L666: certReq.certificateAuthorities = c.config.ClientCAs.Subjects()
handshake_server.go#L691: if c.config.ClientAuth >= RequestClientCert {
handshake_server.go#L712: if c.config.VerifyConnection != nil {
handshake_server.go#L713: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_server.go#L726: preMasterSecret, err := keyAgreement.processClientKeyExchange(c.config, hs.cert, ckx, c.vers)
handshake_server.go#L743: if err := c.config.writeKeyLog(keyLogLabelTLS12, hs.clientHello.random, hs.masterSecret); err != nil {
handshake_server.go#L883: if c.config.WrapSession != nil {
handshake_server.go#L885: m.ticket, err = c.config.WrapSession(c.connectionStateLocked(), state)
handshake_server.go#L894: m.ticket, err = c.config.encryptTicket(stateBytes, c.ticketKeys)
handshake_server.go#L945: if len(certs) == 0 && requiresClientCert(c.config.ClientAuth) {
handshake_server.go#L954: if c.config.ClientAuth >= VerifyClientCertIfGiven && len(certs) > 0 {
handshake_server.go#L956: Roots: c.config.ClientCAs,
handshake_server.go#L957: CurrentTime: c.config.time(),
handshake_server.go#L999: if c.config.VerifyPeerCertificate != nil {
handshake_server.go#L1000: if err := c.config.VerifyPeerCertificate(certificates, c.verifiedChains); err != nil {
handshake_server.go#L1025: config: c.config,
handshake_server_tls13.go#L135: if c.vers < c.config.maxSupportedVersion(roleServer) {
handshake_server_tls13.go#L150: if _, err := io.ReadFull(c.config.rand(), hs.hello.random); err != nil {
handshake_server_tls13.go#L209: preferredGroups := c.config.curvePreferences(c.vers)
handshake_server_tls13.go#L263: key, err := generateECDHEKey(c.config.rand(), ecdhGroup)
handshake_server_tls13.go#L299: selectedProto, err := negotiateALPN(c.config.NextProtos, hs.clientHello.alpnProtocols, c.quic != nil)
handshake_server_tls13.go#L334: if c.config.SessionTicketsDisabled {
handshake_server_tls13.go#L363: if c.config.UnwrapSession != nil {
handshake_server_tls13.go#L365: sessionState, err = c.config.UnwrapSession(identity.label, c.connectionStateLocked())
handshake_server_tls13.go#L373: plaintext := c.config.decryptTicket(identity.label, c.ticketKeys)
handshake_server_tls13.go#L389: if c.config.time().Sub(createdAt) > maxSessionTicketLifetime {
handshake_server_tls13.go#L402: needClientCerts := requiresClientCert(c.config.ClientAuth)
handshake_server_tls13.go#L406: if sessionHasClientCerts && c.config.ClientAuth == NoClientCert {
handshake_server_tls13.go#L409: if sessionHasClientCerts && c.config.time().After(sessionState.peerCertificates[0].NotAfter) {
handshake_server_tls13.go#L412: if sessionHasClientCerts && c.config.ClientAuth >= VerifyClientCertIfGiven &&
handshake_server_tls13.go#L512: certificate, err := c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello))
handshake_server_tls13.go#L782: err := c.config.writeKeyLog(keyLogLabelClientHandshake, hs.clientHello.random, clientSecret)
handshake_server_tls13.go#L787: err = c.config.writeKeyLog(keyLogLabelServerHandshake, hs.clientHello.random, serverSecret)
handshake_server_tls13.go#L811: echKeys := hs.c.config.EncryptedClientHelloKeys
handshake_server_tls13.go#L812: if hs.c.config.GetEncryptedClientHelloKeys != nil {
handshake_server_tls13.go#L813: echKeys, err = hs.c.config.GetEncryptedClientHelloKeys(clientHelloInfo(hs.ctx, c, hs.clientHello))
handshake_server_tls13.go#L835: return hs.c.config.ClientAuth >= RequestClientCert && !hs.usingPSK
handshake_server_tls13.go#L853: if c.config.ClientCAs != nil {
handshake_server_tls13.go#L854: certReq.certificateAuthorities = c.config.ClientCAs.Subjects()
handshake_server_tls13.go#L886: sig, err := hs.cert.PrivateKey.(crypto.Signer).Sign(c.config.rand(), signed, signOpts)
handshake_server_tls13.go#L933: err := c.config.writeKeyLog(keyLogLabelClientTraffic, hs.clientHello.random, hs.trafficSecret)
handshake_server_tls13.go#L938: err = c.config.writeKeyLog(keyLogLabelServerTraffic, hs.clientHello.random, serverSecret)
handshake_server_tls13.go#L959: if hs.c.config.SessionTicketsDisabled {
handshake_server_tls13.go#L1007: if c.config.WrapSession != nil {
handshake_server_tls13.go#L1009: m.label, err = c.config.WrapSession(c.connectionStateLocked(), state)
handshake_server_tls13.go#L1019: m.label, err = c.config.encryptTicket(stateBytes, c.ticketKeys)
handshake_server_tls13.go#L1030: if _, err := c.config.rand().Read(ageAdd); err != nil {
handshake_server_tls13.go#L1053: if c.config.VerifyConnection != nil {
handshake_server_tls13.go#L1054: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
handshake_server_tls13.go#L1080: if c.config.VerifyConnection != nil {
handshake_server_tls13.go#L1081: if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
quic.go#L208: if q.conn.config.MinVersion < VersionTLS13 {
quic.go#L332: c.config.ClientSessionCache.Put(cacheKey, cs)
ticket.go#L302: createdAt: uint64(c.config.time().Unix()),
tls.go#L50: config: config,
tls.go#L63: config: config,